<?php
require_once 'Libs/Crawler.php';

//种子链接，各个板块首页链接
$seedUrl = array(
	'http://sports.sina.com.cn/', 'http://ent.sina.com.cn/', 'http://finance.sina.com.cn/', 'http://tech.sina.com.cn/', 
	'http://mil.news.sina.com.cn/','http://games.sina.com.cn/', 'http://roll.news.sina.com.cn', 'http://book.sina.com.cn/', 
	'http://edu.sina.com.cn/',
	'http://sports.163.com/', 'http://ent.163.com/', 'http://money.163.com/', 'http://tech.163.com/', 'http://mobile.163.com/', 
	'http://digi.163.com/', 'http://auto.163.com/', 'http://travel.163.com/', 'http://baby.163.com/', 'http://war.163.com/', 
	'http://play.163.com/', 'http://news.163.com/', 'http://edu.163.com/', 
	'http://sports.qq.com/', 'http://ent.qq.com/', 'http://finance.qq.com/', 'http://cul.qq.com/', 'http://mil.qq.com/',
	'http://tech.qq.com/', 'http://games.qq.com/', 'http://edu.qq.com/', 'http://news.qq.com/');

//Crawler类参数分别为种子链接、层数、爬取时延、新闻有效天数
$crawler = new Crawler($seedUrl, 2, 0.15, 5);
while (true){
    echo "Start!"."\n";
    $crawler->run();
    echo "Finish!"."\n\n";
    sleep(120);
}